package ink.ykb.droolstest.controller;

import java.util.Date;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/main")
public class TestController {
	
	
	@RequestMapping("/test")
	public String test() {
		return "index.html#userTable";
	}
	
	
	@RequestMapping("/error")
    public String error() {
	  throw new RuntimeException("qqqqq");
    }
	
	@RequestMapping("/time")
	@ResponseBody
	public Date time() {
		return new Date();
	}
}
